<template>
  <div class="swiper-container">
    <div class="swiper-wrapper">
      <slot></slot>
    </div>
    <div class="swiper-pagination"></div>
  </div>
</template>

<script>
import Swiper from "swiper/bundle"; //引入swiper.js
import 'swiper/swiper-bundle.min.css' //引入swiper.css


export default {
  name: "FilmSwiper",
  mounted() {
    new Swiper('.swiper-container', {
      //分页器
      pagination: {
        el: '.swiper-pagination'
      },
      observer:true,//修改swiper自己或子元素时，自动初始化swiper
      observeParents:true,//修改swiper的父元素时，自动初始化swiper
    })
  },
}
</script>

<style lang="scss" scoped>
</style>